
<?php
$con=mysql_connect('localhost','root','');
if(!$con)
{
  die('could not connect:'.mysql_error());
  }
  mysql_select_db("ETrawelMart",$con);
  
  $trips = mysql_query("SELECT * FROM tours");
  
  $getname=$_GET["tripcode"];
  
  while($row = mysql_fetch_array($trips))
  {
	  if($row['tripcode']==$getname)
	  {
		  $name=$row['name'];
		  $days=$row['days'];
		  $cost=$row['cost'];
		  $dates=$row['dates'];
		  echo "$name: $days: $cost: $dates";
       
       }
  }
  
 
  mysql_close($con);
  
  ?>
